{--------------------------------------------------------------------------------------------------}
{on init callback - called when the instrument is loaded-------------------------------------------}
{--------------------------------------------------------------------------------------------------}
on init
	{Make a the instrument's performance view}
	make_perfview

	{set the performance view's height}
	set_ui_height_px(300)

	{set the performance view's width}
	set_ui_width_px(644)

	{set the instrument's icon image}
	set_control_par_str($INST_ICON_ID,$CONTROL_PAR_PICTURE,"Kontakt Instrument - Icon")

	{set the instrument's wallpaper image}
	set_control_par_str($INST_WALLPAPER_ID,$CONTROL_PAR_PICTURE,"Kontakt Instrument - Wallpaper")

	{declare two sliders}
	declare ui_slider $slider1 (0,333333)
	declare ui_slider $slider2 (0,333333)
	
	{store the id of boths sliders in a variable}
	declare $slider1_id := get_ui_id($slider1)
	declare $slider2_id := get_ui_id($slider2)

	{make it so the slider's values are stored when the instrument is saved}
	make_persistent($slider1)
	make_persistent($slider2)

	{make is to the slider's values are recalled with the instrument is loaded}
	read_persistent_var($slider1)
	read_persistent_var($slider2)

	{set the sliders to use a custom image}
	set_control_par_str($slider1_id, $CONTROL_PAR_PICTURE, "Kontakt Instrument - Knob")
	set_control_par_str($slider2_id, $CONTROL_PAR_PICTURE, "Kontakt Instrument - Knob")

	{set the slider mouse behaviour}
	set_control_par($slider1_id, $CONTROL_PAR_MOUSE_BEHAVIOUR, -2000)
	set_control_par($slider2_id, $CONTROL_PAR_MOUSE_BEHAVIOUR, -2000)

	{position the sliders}
	move_control_px($slider1, 510, 225)
	move_control_px($slider2, 580, 225)
end on

{--------------------------------------------------------------------------------------------------}
{on ui_control callbacks - called when a specific ui control is touched----------------------------}
{--------------------------------------------------------------------------------------------------}
on ui_control ($slider1)
	{set_engine_par(<parameter>,<value>,<group>,<slot>,<generic>)}
end on

on ui_control ($slider2)
	{set_engine_par(<parameter>,<value>,<group>,<slot>,<generic>)}
end on